/**    
* @Title: UserData.java
* @Package: org.vdalf.gsgz.entities
* @author vDalf 2020-09-26 16:04:57 下午4:04:57
* @Copyright © 2020 vDalf Block-Chain Foundation (In Preparation Non-Governmental Organization) All rights reserved.
*/
package org.vdalf.gsgz.entities;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicInteger;

import org.vdalf.gsgz.enums.EnumConditions;

/**    
* @Title: UserData.java
* @Package: org.vdalf.gsgz.entities
* @Description: 
* @author vDalf 2020-09-26 16:04:57 下午4:04:57
*/
public class UserData {

	private static final AtomicInteger idSeq = new AtomicInteger();
	
	private static final UserData instance = new UserData();

	private Map<String,Map<EnumConditions,TreeMap<BigDecimal,PlanEntrust>>> planEntrusts;
	
	private UserData() {
		super();
		planEntrusts = new HashMap<>();
	}

	public static UserData getInstance() {
		return instance;
	}
	
	public static Integer nextId() {
		return idSeq.addAndGet(1);
	}

	public Map<String, Map<EnumConditions, TreeMap<BigDecimal, PlanEntrust>>> getPlanEntrusts() {
		return planEntrusts;
	}

	@Override
	public String toString() {
		return "UserData [planEntrusts=" + planEntrusts + "]";
	}
	
}
